import React from 'react'
import UncontrolledDemo from './UncontrolledDemo'
// import ProtalsDemo from './ProtalsDemo'
import ContextDemo from './ContextDemo'
import LazyDemo from './LazyDemo'
import SCUDemo from './SCUDemo'

class AdvanceUseDemo extends React.Component {
    constructor(props) {
        super(props)
        this.state = { show: false }
    }
    render() {
        return <div>
            <h2 className="link" onClick={this.toggle}>高级使用</h2>
            <div style={{display: this.state.show ? 'block' : 'none'}}>
                <UncontrolledDemo/> <hr />
                {/* <ProtalsDemo>Modal 内容</ProtalsDemo> <hr /> */}
                <ContextDemo/> <hr />
                <LazyDemo/> <hr />
                <SCUDemo/> <hr />
            </div>
        </div>
    }
    toggle = () => {
        this.setState({
            show: !this.state.show
        })
    }

}

export default AdvanceUseDemo